
#ifndef TBRWINDOWAPPLICATION_H
#define TBRWINDOWAPPLICATION_H

#include "TBRapplication.h"
//class DX11Renderer;

namespace TBR
{

	class WindowApplication: public Application
	{
	public:
		WindowApplication(const char* windowTitle, int xPos, int yPos, int w, int h, const TBR::ColorRGBA &backcolor);
		virtual ~WindowApplication();
		static WindowApplication* create(const char* title, int xPos, int yPos, int w, int h, TBR::ColorRGBA backcolor);
		virtual int run(int, char**);

		virtual int windowMain(int, char **);

		int getxPos();
		int getyPos();
		int getWidth();
		int getHeight();
		float getAspectRatio();
		void setWindowID(int id);
		int getWindowID();
		const char* getWindowTitle();


		//Mouse
		void setMousePosition(int x, int y);
		void getMousePosition(int& x, int & y);

		// Event callbacks
		virtual bool onInitialize();
		virtual void onTerminate();
		virtual void onIdle();
		virtual void onDisplay();
		virtual bool onKeyDown(unsigned char key, int x, int y);
		virtual bool onMouseClick(int button, int state, int x, int y, unsigned int modifiers);

		static const int MOUSE_LB;
		static const int MOUSE_MB;
		static const int MOUSE_RB;

		static const int MODIFIER_CONTROL;
		static const int MODIFIER_LB;
		static const int MODIFIER_MB;
		static const int MODIFIER_RB;
		static const int MODIFIER_SHIFT;

		//frame measurement

	protected:

		const char* _windowTitle;
		int _xPos;
		int _yPos;
		int _w, _h;
		ColorRGBA _backcolor;
		int _windowID;

		Renderer* _renderer;
		

		

	};




}

#endif 